From: Jonas Dreßler Date: Tue, 9 Jun 2020 16:31:23 +0000 (+0200) Subject: dnd: Set drag actor position immediately after reparenting X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~684^2^2~236 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=89ba8562c3c309b9e0bb5c453c907d05d284e5f5;p=gnome-shell.git dnd: Set drag actor position immediately after reparenting For drag actors which get reparented to the uiGroup, we currently wait until the next input event to set the fixed position of the actor, until that they will just be allocated their old fixed position, which is 0, 0. So avoid drag actors flickering at the top left for one frame and position them correctly right after reparenting. https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1310 --- diff --git a/js/ui/dnd.js b/js/ui/dnd.js index f356c03c7..464d61bb8 100644 --- a/js/ui/dnd.js +++ b/js/ui/dnd.js @@ -428,6 +428,10 @@ var _Draggable = class _Draggable { this._dragOffsetX -= transX; this._dragOffsetY -= transY; + this._dragActor.set_position( + this._dragX + this._dragOffsetX, + this._dragY + this._dragOffsetY); + if (this._dragActorMaxSize != undefined) { let [scaledWidth, scaledHeight] = this._dragActor.get_transformed_size(); let currentSize = Math.max(scaledWidth, scaledHeight);